﻿using System.Data;
using System.Data.SqlClient;
using LoverMeeting.Model.Entity;

namespace LoverMeeting.DataBase.DataMappers
{
    public class ImageMapper : IDataMapper<Image>
    {
        public Image GetData(IDataReader reader)
        {
            var entity = new Image
            {
                Id = (int)reader["ImageId"],
                Name = (string)reader["ImageName"],
                Url = (string)reader["ImageUrl"]
            };
            return entity;
        }

        public void SetParameter(SqlCommand command, Image entity)
        {
            throw new System.NotImplementedException();
        }

        public int GetRecordCount(IDataReader reader)
        {
            throw new System.NotImplementedException();
        }
    }
}
